function output = dist_generator(t)

output = 0;
     if(t > 0.1 && t<= 0.3)
         output = -0.2;
     elseif(t < 0.5)
         output = 0.2;
     end
end

